package com.dede.loadsirtest

import android.app.Application
import com.dede.loadsirtest.callBack.EmptyCallback
import com.dede.loadsirtest.callBack.ErrorCallback
import com.dede.loadsirtest.callBack.LoadingCallback
import com.kingja.loadsir.callback.SuccessCallback
import com.kingja.loadsir.core.LoadSir


/**
 * @author hsh
 * @date 2018/1/22 16:39.
 * @doc
 */
class App : Application() {

    override fun onCreate() {
        super.onCreate()

        LoadSir.beginBuilder()
                .addCallback(ErrorCallback())//添加各种状态页
                .addCallback(EmptyCallback())
                .addCallback(LoadingCallback())
//                .addCallback(TimeoutCallback())
//                .addCallback(CustomCallback())
                .setDefaultCallback(SuccessCallback::class.java)//设置默认状态页
                .commit()
    }
}